home *** CD-ROM | disk | FTP | other *** search
-
-
- CRLF
- ════
-
- (c) Copyright 1990,92 by Klaus Hartnegg, D-7835 Teningen
-
-
-
- Description
- ───────────
- CRLF is a filter for text-files. It will ensure that each line of the
- file ends correctly with CR (carriage return) and LF (line feed). It
- will work regardless whether the input file contains CR's only, LF's
- only or both intermixed or already is correct.
-
-
-
- Background
- ──────────
- Most PC programs assume that all lines of a text files are terminated
- with the two special characters CR (carriage return) and LF (line feed).
-
- However not all computers do it this way. On unix for example the
- Cr is usually missing. I even already hot files that contained CR and
- LF in the wrong order and some contained sequences like CR LF LF LF.
-
- The program CRLF will correct all these cases: whenever it encounters
- either CR of LF it will assume that this is the end of a line and
- output CR and LF. When it encounters several CR and/or LF in sequence
- (even in strange orders, see above), it will try very hard to
- determine how many line breaks this shall be and output exactly this
- number of Cr + Lf. It will never output a CR or a LF alone.
-
-
- There is also a program included in this package that will do the
- reverse thing: StrpCrLf will wipe out Line Feed or Carriage Return
- characters.
-
-
-
- Usage
- ─────
-
- Syntax : CRLF [infile [outfile]]
-
- Infile and outfile are the names of an input and output-file. When
- outfile is omitted, a temporary file will be used and be moved over
- infile after the conversion has ended successfully.
-
- Infile and outfile may contain the wildcard characters "?" and "*".
-
- Infile may be a directory instead a file. In this case all files within
- this directory will be converted.
-
- Outfile may be a directory too. In this case the name for the output
- file(s) will be derived from the input file(s).
-
- When both infile and outfile are directories all files from the input
- directory will be converted and the results be written to the output
- directory.
-
-
- You can also use CrLf as a unix-like filter i.e. it can read data from
- the standard input and write the translated data to standard output.
- CrLf will assume that you want to use it as a filter when the standard
- input is redirected. Please read your DOS manual to learn more about
- pipes and how to redirect standard input and output.
-
-
-
- Examples:
-
- - convert the file "ANY.TXT"
- CRLF ANY.TXT
-
- - convert "UNIX.TXT" to "DOS.TXT"
- CRLF UNIX.TXT DOS.TXT
-
- - convert all files in the directory "D:\TEXTS"
- CRLF D:\TEXTS
-
- - the same again but leave files in D:\TEXTS\EBCDIC unchanged and
- write the output to D:\TEXTS\NEW
- CRLF D:\TEXTS D:\TEXTS\NEW
-
-
- an example of using CrLf as filter:
-
- - show ANY.TXT on screen using MORE:
- TYPE ANY.TXT | CRLF | MORE
-
-
-
- Technical notes:
- ────────────────
- CrLf will conserve the file date.
- Of course this will not work if it is used as a filter and the output
- is directed to a file.
-
- Execution speed is about 6 kByte per second on a 12 MHz AT but will
- decrease dramatically if there are less than 100 kByte RAM available.
-
- Please note that the conversion that CrLf does is in some cases NOT
- reversible, neither is the conversion done with StripCrLf.
- Look what happens here:
-
- abc Cr Lf Lf def ──CrLf──> abc Cr Lf Cr Lf def ──StripCrLf──> abc Cr Cr def
-
-
-
-
- Known Bugs:
- ───────────
- Please avoid translating a file to itself.
- The contents of that file will get lost.
-
-
-
- Revision history
- ────────────────
- 1.0, July 1990
- (first release)
-
- 1.1, September 1990
- - error corrected that caused error messages to be written to the output
- file rather than to the screen when output was redirected
- - StripLF added to CrLf package for E2A users
- - end-of-line detection completely rewritten
- - registration now handled with key-files
-
- 1.2, skipped
-
- 1.3, November 1990
- - wildcards allowed on unregistered copies too
- - registration reminder
- - visual byte counter during translation
-
- 1.4, 2-Jan-1991
- - bug caused 1.3 to work with very small blocks (1024 bytes), thus being slow
- - removed restriction that caused crlf to truncate lines longer than 255
- characters
- - version 1.4 is 1.4 times faster than version 1.3
-
- 1.41, 8-Feb-1991
- - included StripCR
- - directory detection changed to work with DR-DOS too
-
- 1.42, 16-Feb-1991
- - the previous version didn't work on XT's
-
- 1.5, 8-Aug-1991
- - speed increase by 12%
- - some minor error corrections
- - use unique filename for temporary file
- - added programs StripLf and StripCr
-
- 1.5a, 10-Apr-1992
- - combined StripLf and StripCr in one executable StrpCrLf.
- See separate doc file for example batch programs that do
- the same as StripLf and StripCr did.
-
-
- Included files
- ──────────────
- CRLF EXE the executable
- CRLF DOC this documentation
-
- STRPCRLF EXE program to wipe out carriage return or line feed characters
- STRPCRLF DOC documentation for StrpCrLf
-
- ORDER .FRM order form
- HARTNEGG.LST list of all my shareware programs
-
-
-
- future plans:
- ─────────────
- - enhanced error detection
- - enhanced wildcard-handling
- (allow things like "*DAT.TXT" and "F*1.DAT")
- - option to exclude some files from the conversion process
-
- You can encourage me to spend much more time into the further
- development of this program by paying the registration fee!
-
-
-
- Disclaimer
- ──────────
- It is a well known fact that it is impossible to proof that any given
- (non trivial) program is error free. Of course this software has been
- tested extensively but is is nevertheless not possible to guarantee that
- it will work correctly in all possible situations.
-
- This software is provided as-is, without warranty of any kind. The
- author shall not be liable to the user for any direct, indirect or
- consequential loss arising from the use of or inability to use this
- software.
-
-
-
- License
- ───────
- This is a shareware product and thus not free. It is fully protected by
- international copyright laws.
-
- Shareware is distributed through public access channels so that you can
- evaluate it before deciding wether or not to buy it. If you decide to
- use this software then you are both under legal and moral obligations to
- register it (see separate file ORDER.FRM for a registration form; Visa
- and Master Card accepted!). If you decide not to use it you are under no
- obligation, just don't use it any more.
-
- All corporate, business, government or other entities have to register
- BEFORE using this software.
-
- You are free to copy and distribute this software as long as all files
- belonging to it are distributed together and are not modified in any
- way. If possible please distribute the original ZIP archive.
-
- You must NOT give the key-file away (see below). This file is proof of
- your registration and contains your name and serial number.
-
-
-
- Registering
- ───────────
- Upon payment of the registration fee you will receive a diskette with
- - current unregistered versions of ALL programs that I am
- distributing as shareware
- - the key-file(s) for the program(s) that you registered
- (if any of my programs finds its corresponding key-file it will not
- display the annoying shareware reminder any more)
-
- FREE UPDATE to ALL future versions: the key-files will not only work for
- the present, but also for all future versions of the same program, i.e.
- you have to register only once!
-
-
- The shareware system and the continued availability of quality shareware
- products depend on YOUR willingness to register and pay for the software
- that you use. It's the registration fees YOU pay which allows to support
- and continue to develop such products! Without this support I can not
- continue spending so much time in improving this program.
-
- Show your support for shareware by registering those programs you
- actually use. Shareware is kept alive by YOUR support!
-
-
- ────────────────────────────
-
- Klaus Hartnegg
- Kleist-str. 7
- D-7835 Teningen
- Germany
-
-
- This software is under development. Error reports and other comments are
- welcome. Please do not hesitate to use electronic mail for communication.
- (these addresses may be valid only until end of 1992)
-
- Bitnet : hartnegg@dfrruf1
- Internet : hartnegg@ibm.ruf.uni-freiburg.de
-